package com.zhouheng.springbootdesignpattern.strategicpattern;

import java.math.BigDecimal;

/**
 * 老客户的报价策略，打9折
 *
 * @author 周恒
 * @date 20190614 15:03:23
 * @since v1.0
 */
public class OldCustomerQuoteStrategy implements IQuoteStrategy {

    @Override
    public BigDecimal getPrice(BigDecimal originalPrice) {
        System.out.println("恭喜！老客户享有9折优惠！");
        return originalPrice.multiply(new BigDecimal(0.9)).setScale(2, BigDecimal.ROUND_HALF_UP);
    }

}
